package hutool.crypto;

import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.asymmetric.Sign;
import cn.hutool.crypto.asymmetric.SignAlgorithm;

public class SignTest {

    public static void main(String[] args) {
        sign();
    }

    private static void sign() {
        byte[] data = "我是一段测试文字".getBytes();
        Sign sign = SecureUtil.sign(SignAlgorithm.MD5withRSA);
        byte[] signed = sign.sign(data);

        System.out.println(sign.verify(data, signed));
    }
}
